<?php

/**
 * @filename web.php 
 * @encoding UTF-8 
 * @author  fwz 
 * @datetime 2018-6-8  9:37:19
  */

$web = new swoole_http_server('0,0,0,0',9503);

$web->on("start",function($server){
    echo "swoole http server startd http  \n";
});

$web->on("request",function($request,$response){
    var_dump($request);
    $response->header("Content-type","text/html;charset=utf8");
    $response->end("hello word ".  rand(100, 10000));
});

$web->start();